package org.gd.hellojavacore.tests;

class StringTest {

    public static void main(String...args) {
        test3();
    }

    private static void test1() {
        System.out.println(new String("k1").hashCode());
        System.out.println(new String("k1").toString());
        System.out.println(new String("k1") == new String("k1"));
        System.out.println("k1".hashCode());

        String card = "26201800019793980";
        System.out.printf("%s - length: %d\n", card, card.length());
        if(card.length() == 17) {
            card = card.substring(0, 14);
        }
        System.out.printf("%s - length: %d\n", card, card.length());
    }

    private static void test2() {
        Object o = new String("10");
        System.out.println();
    }

    private static void test3() {
        String.valueOf('c');
    }
}
